import instance from "@/tools/axios";

const getCarSuppliesDetail = (id: string) => {
  return instance.get("/SysCarSupplies/detail", { id });
};

const getCarSuppliesPagination = (params: any) => {
  return instance.get("/SysCarSupplies/pagination", params);
};

const addCarSupplies = (data: any) => {
  return instance.post("/SysCarSupplies/Add", data, {
    headers: {
      "Content-Type": "multipart/form-data",
    },
  });
};

const updateCarSupplies = (data: any) => {
  return instance.post("/SysCarSupplies/update", data, {
    headers: {
      "Content-Type": "multipart/form-data",
    },
  });
};

const deleteCarSupplies = (id: string) => {
  return instance.post("/SysCarSupplies/delete", { id });
};

export {
  getCarSuppliesPagination,
  addCarSupplies,
  updateCarSupplies,
  deleteCarSupplies,
  getCarSuppliesDetail,
};
